using UnityEngine;
using System.Collections;

public class UpgradeWindow : MonoBehaviour {

	bool isShrinking = true;

	void Start() {
		MakeSmall();
	}

	void Update() {
		if(Input.GetKeyDown(KeyCode.Space)) {
			Toggle ();
		}
	}

	public void MakeBig() {
		isShrinking = false;
		GetComponent<Animator>().SetBool("Open", true);

		//Time.timeScale = 0.1f;

	}

	public void MakeSmall() {
		Time.timeScale = 1f;
		isShrinking = true;
		GetComponent<Animator>().SetBool("Open", false);

		//Time.timeScale = 1f;
	}

	public void Toggle() {
		if(isShrinking)
			MakeBig ();
		else
			MakeSmall();
	}

	public void PauseTime() {
		if(!isShrinking) {
			Time.timeScale = 0f;
		}
	}
}
